<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>Title</title>
    <label >账号：<input id="username"></label>
    <span id="tips" style="display: none"></span>
</head>
<body>
<script>
    onload=()=>{
        let tips=document.querySelector('#tips');
        let username=document.querySelector('#username');
        username.onblur=()=>{
            //判断输入的账号是否为admin
            let isAdmin='admin'===username.value;
            //展示文字提醒
            tips.style['display']='inline-block';
            tips.innerText=isAdmin?'该账号不可用':'该账号可用';
            tips.style['color']=isAdmin?'red':'green';

        }
    }
</script>
</body>
</html>